/*
 * jQuery Nivo Slider v2.3
 * http://nivo.dev7studios.com
 *
 * Copyright 2010, Gilbert Pellegrom
 * Free to use and abuse under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * May 2010 - Pick random effect from specified set of effects by toronegro
 * May 2010 - controlNavThumbsFromRel option added by nerd-sh
 * May 2010 - Do not start nivoRun timer if there is only 1 slide by msielski
 * April 2010 - controlNavThumbs option added by Jamie Thompson (http://jamiethompson.co.uk)
 * March 2010 - manualAdvance option added by HelloPablo (http://hellopablo.co.uk)
 */
    $(document).ready(function() {

        //Change these values to style your modal popup
        var align = 'center';                                    //Valid values; left, right, center
        var top = 100;                                             //Use an integer (in pixels)
        var width = 500;                                         //Use an integer (in pixels)
        var padding = 10;                                        //Use an integer (in pixels)
        var backgroundColor = '#FFFFFF';                         //Use any hex code
        var source = 'demo.html';                                 //Refer to any page on your server, external pages are not valid e.g. http://www.google.co.uk
        var borderColor = '#333333';                             //Use any hex code
        var borderWeight = 4;                                     //Use an integer (in pixels)
        var borderRadius = 5;                                     //Use an integer (in pixels)
        var fadeOutTime = 300;                                     //Use any integer, 0 = no fade
        var disableColor = '#666666';                             //Use any hex code
        var disableOpacity = 40;                                 //Valid range 0-100
        var loadingImage = 'lib/release-0.0.1/loading.gif';        //Use relative path from this page

        //This method initialises the modal popup
        $(".modal").click(function() {
            modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime, source, loadingImage);
        });

        //This method hides the popup when the escape key is pressed
        $(document).keyup(function(e) {
            if (e.keyCode == 27) {
                closePopup(fadeOutTime);
            }
        });

    });

